package com.itrip.itripauth.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.itrip.itripauth.entity.Hotel;
import com.itrip.itripauth.entity.HotelOrder;
import com.itrip.itripauth.vo.AddOrderVo;
import com.itrip.itripauth.vo.HotelOrderVo;
import com.itrip.itripauth.vo.PageVo;
import com.itrip.itripauth.vo.PersonalOrderRoomVO;

import java.util.Map;

/**
 * <p>
 * 订单表 服务类
 * </p>
 *
 * @author 四阶段项目二组
 * @since 2020-02-25
 */
public interface HotelOrderService extends IService<HotelOrder> {
    PageVo<HotelOrder> getPersonalOrderList(HotelOrderVo HotelOrderVo);


    HotelOrder getHotelOrderById(String orderId);

    /**
     * 通过订单id查看订单详情-具体房型信息等- add by hanlu
     * @param orderId
     * @return
     * @throws Exception
     */
    PersonalOrderRoomVO getHotelOrderRoomInfoById(Long orderId)throws Exception;


    public HotelOrder getHotelOrderById(Long id);


    /**
     *  根据订单号查询订单信息
     */
    HotelOrder loadHotelOrder(String orderNo) throws Exception;

    //修改订单信息
    Map<String,String> updateOrder(AddOrderVo addOrderVo);

    Map<String, Object> getHotelOrderRoomId(Integer hotelId, Integer orederId);

    Map<String,String> addHotelOrder(AddOrderVo addOrderVo);

    //修改订单信息
    Integer updateHotelOrder(HotelOrder hotelOrder);
//
//    //定时任务，待支付没有付款的自己取消支付并回滚库存
    int timedCancellation();
}
